package com.tanhua.service;

import com.tanhua.api.mongo.MessageApi;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;

@Service
public class MessageService {
    @Reference
    private MessageApi messageApi;

    public String pass(String[] id) {
        Boolean result = messageApi.updateStatus(id, 1);
        if (result){
            return "审核通过";
        }
        return "审核失败";
    }

    public String reject(String[] id) {
        Boolean result = messageApi.updateStatus(id, 2);
        if (result){
            return "拒绝成功";
        }
        return "拒绝失败";
    }
}
